package com.erHuo.controller;

import com.erHuo.entity.AcctUser;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * 用户控制器
 * Created by djx on 2017/4/24.
 */
@Controller
@RequestMapping("/user")
public class UserController {

    private static final Logger LOGGER = Logger.getLogger(UserController.class);

    @RequestMapping("/index")
    public String index(HttpSession httpSession, HttpServletRequest request){
        AcctUser acctUser = (AcctUser) httpSession.getAttribute("acctuser");
        request.setAttribute("acctuser",acctUser);
        System.out.println("------" + System.nanoTime());
        return "user/index";
    }
}
